package com.easy.dn.ui.usercenter.activity;

import android.view.View;

import com.easy.common.base.BaseActivity;
import com.easy.common.commonwidget.DnToolbar;

import dn.easy.com.easyto.R;

/**
 * 個人中心 备注
 * <p>
 * 相对简单  没使用mvp
 */
public class RemarkActivity extends BaseActivity implements  DnToolbar.OnLeftTitleClickListener {


//    @Bind(R.id.toolbar)
//    DnToolbar mToolbar;
//    @Bind(R.id.recyclerview)
//    XRecyclerView mRecyclerview;
//    @Bind(R.id.empty_view)
//    FrameLayout mEmptyView;
//    private List<RecentBean> mList;
//    private RemarkAdapter mAdapter;
//    private int page = 1, pageCount = 10;
//    private int mIsRefeshOrLoad = 0;

    @Override
    public int getLayoutId() {
        return R.layout.activity_remark;
    }

    @Override
    public void initPresenter() {

    }

    @Override
    public void initView() {
        mToolbar.setMainTitle(R.string.user_center_remark_text);
        mToolbar.setOnLeftTitleClickListener(this);
        loadData();
    }

    private void loadData() {
//        Map<String, String> map = MapHelper.getAccessMap();
//        map.put("pageNum", page + "");
//        map.put("rowCountOfOnePage", pageCount + "");
//        map.put("type", "3");
//        Api.getInstance().getProxy(ApiService.class).getUserMarkData(Api.getCacheControl(), map).
//                map(new Func1<List<RecentBean>, List<RecentBean>>() {
//                    @Override
//                    public List<RecentBean> call(List<RecentBean> recentBeen) {
//                        List<JobAddressBean> addressList;
//                        if (DnUtils.list == null ) {
//                            addressList = DnUtils.getAddressList();
//                        } else {
//                            addressList = DnUtils.list;
//                        }
//                        for (JobAddressBean bean : addressList) {
//                            for (RecentBean recentBean : recentBeen) {
//                                String city = recentBean.getCity();
//                                if (bean.getCode().equals(city)) {
//                                    recentBean.setCityName(bean.getName());
//                                }
//                            }
//                        }
//                        return recentBeen;
//                    }
//                }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new RxSubscriber<List<RecentBean>>(this, true) {
//            @Override
//            protected void _onNext(List<RecentBean> data) {
//                mList = data;
//                if (mIsRefeshOrLoad == 1) {
//                    mRecyclerview.refreshComplete();
//                    mAdapter.notifyDataSetChanged();
//                } else if (mIsRefeshOrLoad == 2) {
//                    if (data.size() == 0) {
//                        mRecyclerview.setNoMore(true);
//                        showShortToast("我的弟弟 没数据啦");
//                    }
//                    mRecyclerview.loadMoreComplete();
//                    mAdapter.notifyDataSetChanged();
//                } else {
//                    mAdapter = new RemarkAdapter(RemarkActivity.this, R.layout.item_remark, mList);
//                    mRecyclerview.setAdapter(mAdapter);
//                }
//            }
//
//            @Override
//            protected void _onError(String message) {
//                ToastUitl.showShort(message);
//            }
//        });


    }

    @Override
    public void onLeftClick(View view) {
        finish();
    }
}